#include <iostream>
using namespace std;

#define DF(N) void N(){cout << "The function "#N" called" << endl;}

//declaring here ...
DF(a);
DF(b);
DF(c);
DF(d);
DF(e);
DF(f);
DF(g);

// is a array of pointers to functions :)
void (*fp_func[])() = {a,b,c,d,e,f,g};

void fo(){
    cout << "func() called here !"<< endl;
}

int main(){

    void (*fp)();

    fp = fo;

    //calling the dunction
    (*fp)();

    while (1){
    
        cout << "press a key from a to g please ??" << endl;
        char c,cr;

        cin.get(c);

        if (c=='q')
            break;

        if (c<'a' || c >'g')
            continue;

        //call here the one which you want ????
        (*fp_func[c-'a'])();
    }
}
